package ipdesk.model.analysis.dao;



import ipdesk.model.analysis.bean.AnalysisSeminarBean;

import java.util.List;
import java.util.Map;

import com.ibatis.dao.client.DaoManager;
import com.opensymphony.xwork2.ActionContext;

import ecg.dao.DaoService;

public class AnalysisSeminarDao {
	
	private static AnalysisSeminarDao singleton;
		
	protected AnalysisSeminarDao(){}
	
	public static AnalysisSeminarDao getInstance()
	{
		if(singleton == null)
		{
			singleton = new AnalysisSeminarDao();
		}
		
		return singleton;
	}
	
	private DaoManager	manager	= DaoService.getInstance();
	private IAnalysisSeminar analysisSeminar 	= (IAnalysisSeminar)manager.getDao(IAnalysisSeminar.class, "ip_desk");
	
	ActionContext context = ActionContext.getContext();
	Map<String, String> session = (Map<String, String>)context.getSession();
	
	public List<AnalysisSeminarBean> getYears() throws Exception{
		
		List<AnalysisSeminarBean> getYears = analysisSeminar.getYears();
		
		return getYears;
	}
	
	public List<AnalysisSeminarBean> getAnalysisSeminarList(String selectedYear) throws Exception{
		
		List<AnalysisSeminarBean> analysisSeminarList = analysisSeminar.getAnalysisSeminarList(selectedYear);
		
		return analysisSeminarList;
	}

	public List<AnalysisSeminarBean> getAnalysisSeminarListByMonth(AnalysisSeminarBean analysisSeminarBean) throws Exception{
		List<AnalysisSeminarBean> analysisSeminarListByMonth = analysisSeminar.getAnalysisSeminarListByMonth(analysisSeminarBean);
		return analysisSeminarListByMonth;
	}
}
